<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>宠物店-详细数据</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <META http-equiv=Content-Type content="text/html; charset=utf-8">
    <META content="MSHTML 6.00.3790.4807" name=GENERATOR>
	<meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no, viewport-fit=cover">
<meta http-equiv="x-dns-prefetch-control" content="on">
<script type="text/javascript" src="./petstore_tongzhou.js"></script>
 
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none
        }
        html, body{
            height: 100%;
            width: 100%;
        }
        #container {
            height: 100%;
            width: 980px;
            position: relative;
            padding-top: 20px;
            margin: auto; 
            font-size: 14px;
            font-family: "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"
        }
         
    </style>
</head>
<body>

<div id="container" class="amap-container" style="position: relative; background: rgb(252, 249, 242);">
</div>


<script>
    function getQueryVariable(variable){
       var query = window.location.search.substring(1);
       var vars = query.split("&");
       for (var i=0;i<vars.length;i++) {
               var pair = vars[i].split("=");
               if(pair[0] == variable){return pair[1];}
       }
       return(false);
    }

   var storeId = getQueryVariable("storeId");

   for (var i = 0; i < capitals.length; i++) {
        if(capitals[i].id == storeId) {
            var storeInfo = capitals[i];
            var infoHtml = "店名：" + storeInfo.name+"<br/>地址："+storeInfo.address+"<br/>电话：" +storeInfo.tel+ "<br/>类型："+storeInfo.type ;
            if(storeInfo.photos && storeInfo.photos.length>0) {
                for(var p=0;p< storeInfo.photos.length;p++) {
                    infoHtml += "<br/><img src='"+ storeInfo.photos[p].url+"'/>"
                }
            }


            document.querySelector("#container").innerHTML = infoHtml;

        } 
    }


</script>
</body>
</html>